package de.htw_saar.mad_ea;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
//import android.support.v4.app.NavUtils;
import android.view.View;

public class AdditionalOperations extends Activity {
	CalculatorOps calc;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_additional_operations);
        //getActionBar().setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_additional_operations, menu);
        return true;
    }

    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
//        switch (item.getItemId()) {
//            case android.R.id.home:
//                NavUtils.navigateUpFromSameTask(this);
//                return true;
//        }
        return super.onOptionsItemSelected(item);
    }

    public void actions (View v) {
		switch(v.getId()){
		case R.id.button_sin:
		case R.id.button_cos:
		case R.id.button_tan:
		case R.id.button_sqrt:
			CalculatorOps.getInstance(this).writer_operator_extended(v);
			break;
		}
	}
}
